#!/bin/bash

cd /var/www/graphs
rm *.rrd
rm *.png

rrdtool create cpu.rrd \
--start N \
--step 60 \
DS:cpu:GAUGE:120:0:100 \
DS:cus:GAUGE:120:0:100 \
DS:csy:GAUGE:120:0:100 \
DS:cwa:GAUGE:120:0:100 \
RRA:MIN:0.5:2:1440 \
RRA:MAX:0.5:2:1440 \
RRA:AVERAGE:0.5:2:1440

rrdtool create system.rrd \
--start N \
--step 60 \
DS:ibi:GAUGE:120:0:1000000 \
DS:ibo:GAUGE:120:0:1000000 \
DS:system-in:GAUGE:120:0:1000000 \
DS:system-cs:GAUGE:120:0:1000000 \
RRA:MIN:0.5:2:1440 \
RRA:MAX:0.5:2:1440 \
RRA:AVERAGE:0.5:2:1440

rrdtool create memory.rrd \
--start N \
--step 60 \
DS:memory-buffer:GAUGE:120:0:8115752 \
DS:memory-cache:GAUGE:120:0:8115752 \
RRA:MIN:0.5:2:1440 \
RRA:MAX:0.5:2:1440 \
RRA:AVERAGE:0.5:2:1440

rrdtool create network.rrd \
--start N \
--step 60 \
DS:packets-in-rate:GAUGE:120:0:10000000 \
DS:packets-out-rate:GAUGE:120:0:10000000 \
RRA:MIN:0.5:2:1440 \
RRA:MAX:0.5:2:1440 \
RRA:AVERAGE:0.5:2:1440

rrdtool create network1.rrd \
--start N \
--step 60 \
DS:traffic-in-rate:GAUGE:120:0:10000000 \
DS:traffic-out-rate:GAUGE:120:0:10000000 \
RRA:MIN:0.5:2:1440 \
RRA:MAX:0.5:2:1440 \
RRA:AVERAGE:0.5:2:1440

rrdtool create accel.rrd \
--start N \
--step 60 \
DS:cpu:GAUGE:120:0:1000000 \
DS:starting:GAUGE:120:0:1000000 \
DS:active:GAUGE:120:0:1000000 \
DS:finishing:GAUGE:120:0:1000000 \
RRA:MIN:0.5:2:1440 \
RRA:MAX:0.5:2:1440 \
RRA:AVERAGE:0.5:2:1440

